<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE MagicHash, NoImplicitPrelude, UnboxedTuples #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Event.Arr</span><span>
</span><span id="line-4"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-5"></span><span>      </span><span class="annot"><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier">Arr</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-6"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Arr.html#new"><span class="hs-identifier">new</span></a></span><span>
</span><span id="line-7"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Arr.html#size"><span class="hs-identifier">size</span></a></span><span>
</span><span id="line-8"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Arr.html#read"><span class="hs-identifier">read</span></a></span><span>
</span><span id="line-9"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Arr.html#write"><span class="hs-identifier">write</span></a></span><span>
</span><span id="line-10"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-11"></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#%24"><span class="hs-operator">($)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#"><span class="hs-identifier">GHC.Prim</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableArray%23"><span class="hs-identifier">MutableArray#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier">RealWorld</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#newArray%23"><span class="hs-identifier">newArray#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#readArray%23"><span class="hs-identifier">readArray#</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>                 </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#sizeofMutableArray%23"><span class="hs-identifier">sizeofMutableArray#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#writeArray%23"><span class="hs-identifier">writeArray#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#"><span class="hs-identifier">GHC.Types</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier">IO</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier">Int</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">data</span><span> </span><span id="Arr"><span class="annot"><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier hs-var">Arr</span></a></span></span><span> </span><span id="local-6989586621679552719"><span class="annot"><a href="#local-6989586621679552719"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Arr"><span class="annot"><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier hs-var">Arr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableArray%23"><span class="hs-identifier hs-type">MutableArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552719"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span id="local-6989586621679552728"><span class="annot"><a href="GHC.Event.Arr.html#new"><span class="hs-identifier hs-type">new</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679552728"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier hs-type">Arr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552728"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-20"></span><span id="new"><span class="annot"><span class="annottext">new :: forall a. a -&gt; Int -&gt; IO (Arr a)
</span><a href="GHC.Event.Arr.html#new"><span class="hs-identifier hs-var hs-var">new</span></a></span></span><span> </span><span id="local-6989586621679552707"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552707"><span class="hs-identifier hs-var">defval</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679552706"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679552706"><span class="hs-identifier hs-var">n#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(State# RealWorld -&gt; (# State# RealWorld, Arr a #)) -&gt; IO (Arr a)
forall a. (State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a
</span><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-var">IO</span></a></span><span> </span><span class="annot"><span class="annottext">((State# RealWorld -&gt; (# State# RealWorld, Arr a #)) -&gt; IO (Arr a))
-&gt; (State# RealWorld -&gt; (# State# RealWorld, Arr a #))
-&gt; IO (Arr a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679552705"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679552705"><span class="hs-identifier hs-var">s0#</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-21"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; a
-&gt; State# RealWorld
-&gt; (# State# RealWorld, MutableArray# RealWorld a #)
forall a d.
Int# -&gt; a -&gt; State# d -&gt; (# State# d, MutableArray# d a #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#newArray%23"><span class="hs-identifier hs-var">newArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679552706"><span class="hs-identifier hs-var">n#</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552707"><span class="hs-identifier hs-var">defval</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679552705"><span class="hs-identifier hs-var">s0#</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679552704"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679552704"><span class="hs-identifier hs-var">s1#</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679552703"><span class="annot"><span class="annottext">MutableArray# RealWorld a
</span><a href="#local-6989586621679552703"><span class="hs-identifier hs-var">marr#</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679552704"><span class="hs-identifier hs-var">s1#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">MutableArray# RealWorld a -&gt; Arr a
forall a. MutableArray# RealWorld a -&gt; Arr a
</span><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier hs-var">Arr</span></a></span><span> </span><span class="annot"><span class="annottext">MutableArray# RealWorld a
</span><a href="#local-6989586621679552703"><span class="hs-identifier hs-var">marr#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span id="local-6989586621679552718"><span class="annot"><a href="GHC.Event.Arr.html#size"><span class="hs-identifier hs-type">size</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier hs-type">Arr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552718"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span></span><span>
</span><span id="line-24"></span><span id="size"><span class="annot"><span class="annottext">size :: forall a. Arr a -&gt; Int
</span><a href="GHC.Event.Arr.html#size"><span class="hs-identifier hs-var hs-var">size</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier hs-type">Arr</span></a></span><span> </span><span id="local-6989586621679552702"><span class="annot"><span class="annottext">MutableArray# RealWorld a
</span><a href="#local-6989586621679552702"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableArray# RealWorld a -&gt; Int#
forall d a. MutableArray# d a -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#sizeofMutableArray%23"><span class="hs-identifier hs-var">sizeofMutableArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableArray# RealWorld a
</span><a href="#local-6989586621679552702"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span id="local-6989586621679552716"><span class="annot"><a href="GHC.Event.Arr.html#read"><span class="hs-identifier hs-type">read</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier hs-type">Arr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552716"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552716"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-27"></span><span id="read"><span class="annot"><span class="annottext">read :: forall a. Arr a -&gt; Int -&gt; IO a
</span><a href="GHC.Event.Arr.html#read"><span class="hs-identifier hs-var hs-var">read</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier hs-type">Arr</span></a></span><span> </span><span id="local-6989586621679552701"><span class="annot"><span class="annottext">MutableArray# RealWorld a
</span><a href="#local-6989586621679552701"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679552700"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679552700"><span class="hs-identifier hs-var">n#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a
forall a. (State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a
</span><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-var">IO</span></a></span><span> </span><span class="annot"><span class="annottext">((State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a)
-&gt; (State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679552699"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679552699"><span class="hs-identifier hs-var">s0#</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-28"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableArray# RealWorld a
-&gt; Int# -&gt; State# RealWorld -&gt; (# State# RealWorld, a #)
forall d a.
MutableArray# d a -&gt; Int# -&gt; State# d -&gt; (# State# d, a #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#readArray%23"><span class="hs-identifier hs-var">readArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableArray# RealWorld a
</span><a href="#local-6989586621679552701"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679552700"><span class="hs-identifier hs-var">n#</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679552699"><span class="hs-identifier hs-var">s0#</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679552698"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679552698"><span class="hs-identifier hs-var">s1#</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679552697"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552697"><span class="hs-identifier hs-var">val</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679552698"><span class="hs-identifier hs-var">s1#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552697"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span id="local-6989586621679552714"><span class="annot"><a href="GHC.Event.Arr.html#write"><span class="hs-identifier hs-type">write</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier hs-type">Arr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552714"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679552714"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-31"></span><span id="write"><span class="annot"><span class="annottext">write :: forall a. Arr a -&gt; Int -&gt; a -&gt; IO ()
</span><a href="GHC.Event.Arr.html#write"><span class="hs-identifier hs-var hs-var">write</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier hs-type">Arr</span></a></span><span> </span><span id="local-6989586621679552696"><span class="annot"><span class="annottext">MutableArray# RealWorld a
</span><a href="#local-6989586621679552696"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679552695"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679552695"><span class="hs-identifier hs-var">n#</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679552694"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552694"><span class="hs-identifier hs-var">val</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(State# RealWorld -&gt; (# State# RealWorld, () #)) -&gt; IO ()
forall a. (State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a
</span><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-var">IO</span></a></span><span> </span><span class="annot"><span class="annottext">((State# RealWorld -&gt; (# State# RealWorld, () #)) -&gt; IO ())
-&gt; (State# RealWorld -&gt; (# State# RealWorld, () #)) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679552693"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679552693"><span class="hs-identifier hs-var">s0#</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-32"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableArray# RealWorld a
-&gt; Int# -&gt; a -&gt; State# RealWorld -&gt; State# RealWorld
forall d a. MutableArray# d a -&gt; Int# -&gt; a -&gt; State# d -&gt; State# d
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeArray%23"><span class="hs-identifier hs-var">writeArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableArray# RealWorld a
</span><a href="#local-6989586621679552696"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679552695"><span class="hs-identifier hs-var">n#</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552694"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679552693"><span class="hs-identifier hs-var">s0#</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span id="local-6989586621679552692"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679552692"><span class="hs-identifier hs-var">s1#</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679552692"><span class="hs-identifier hs-var">s1#</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-33"></span></pre></body></html>